Angelo Melino

55 Reputation

4 Badges

9 years, 305 days

MaplePrimes Activity


These are questions asked by Angelo Melino

I have an expression that is an infinite sum with coefficients that are generated recursively (see below).  I've tried to evaluate it and similar expressions in MAPLE  but keep getting error messages.  Any suggestions?

I asked an LLM to provide an expansion of the MacDonald function of arbitrary order (a modified Bessel function of the second kind with purely imaginary order and positive argument), K(I*y,r), as a weighted sum of MacDonald functions of integer order. It came back with

         K(I*y,z)=2*sinh(Pi*y)/Pi* [K(0,r)/2*y+sum( (-1)^n*y*BesselK(0,r)/(y^2+n^2),n=1..infinity)]

(see below for more readable text)

I evaluated the LHS and RHS using Maple 2026 for various choices of y and r and found numerical agreement using both "sum" and "Sum".  I was very pleased until I realized that the RHS isn't a convergent series!

Can anyone explain to me how Maple pulls this off! 

(I asked Maplesoft Tech Support but they said it is above their pay grade... I suspect that Maple is using Borel summability to evaluate the RHS but I haven't been able to verify that)

I apologize, but I can't see how to attach a .mw file, so I've cut and pasted the code below

In trying to evaluate the accuracy of an asymptotic approximation, I asked evalf to return the numerical value of the difference of two expressions.  It evaluated each expression but would not take their difference (see line 6).  Any idea what's going on?

restart

g := exp(-r*cosh(x))*x^(2*n); G := Int(g, x = 0 .. infinity)

Int(exp(-r*cosh(x))*x^(2*n), x = 0 .. infinity)

(1)

f0 := arccosh(1+y); df0 := diff(f0, y)

1/(y^(1/2)*(2+y)^(1/2))

(2)

f := f0^(2*n)*df0

arccosh(1+y)^(2*n)/(y^(1/2)*(2+y)^(1/2))

(3)

n := 2; series(f, y)

2*2^(1/2)*y^(3/2)-(7/6)*2^(1/2)*y^(5/2)+(47/80)*2^(1/2)*y^(7/2)-(17281/60480)*2^(1/2)*y^(9/2)+O(y^(11/2))

(4)

r := 6; evalf(G)

0.8560816424e-4

(5)

Ghat := exp(-r)*(2*sqrt(2)*GAMMA(5/2)*`-`*(7*sqrt(2)*(1/6))/r^(5/2)*(GAMMA(7/2)/r^(7/2))); Ghat1 := evalf(Ghat)

0.1056905544e-3-0.2568867641e-4*``

(6)

evalf(Ghat1)

0.1056905544e-3-0.2568867641e-4*``

(7)

 

Download asyapprox.mw

I came across what looks to me like an error in Maple 2023.  If it stands alone, Maple evaluates z^0/0! to 1, but inside the sum command it appears to evaluate the same expression to 0.

Download Weird_sum_behaviour.mw

I was surprised to learn that implicitplot doesn't recognize the constant Pi.  I attach a simple example to illustrate.

restart

with(plots)

f := x-y-Pi

x-y-Pi

(1)

implicitplot(f)

Error, (in plots/implicitplot) found 3 variables that the expression depends on ({Pi, x, y}), but expected only 2

 

evalf(Pi)

3.141592654

(2)

g := x-y-3.14

x-y-3.14

(3)

implicitplot(g)

 

NULL

Download implicitplot_error.mw

1 2 Page 1 of 2